package a.d;

public class n
  implements p
{
  private w a;
  private w b;
  private double c;
  private double d;
  private static double e = 1.0E-008D;
  private static final byte f = 1;
  private static final byte g = 2;
  private static final byte h = 4;
  private static final byte i = 8;
  public static int j;
  
  public n(w paramw1, w paramw2)
  {
    this.a = paramw1;
    this.b = paramw2;
    if (!bool2) {
      if (paramw2.a == paramw1.a)
      {
        if (!bool2) {
          if (paramw1.b < paramw2.b)
          {
            this.c = 1.7976931348623157E+308D;
            this.d = (0.0D / 0.0D);
            if (!bool2) {
              if (!bool1) {
                return;
              }
            }
          }
          else
          {
            this.c = -1.797693134862316E+308D;
            this.d = (0.0D / 0.0D);
            if (bool2) {
              break label126;
            }
          }
        }
        if (!bool1) {
          return;
        }
      }
      else
      {
        this.c = ((paramw2.b - paramw1.b) / (paramw2.a - paramw1.a));
      }
    }
    label126:
    this.d = (paramw1.b - paramw1.a * this.c);
  }
  
  public boolean b()
  {
    if (!w.e) {}
    return Math.abs(d().a - e().a) < e;
  }
  
  public boolean c()
  {
    if (!w.e) {}
    return Math.abs(d().b - e().b) < e;
  }
  
  public w d()
  {
    return this.a;
  }
  
  public w e()
  {
    return this.b;
  }
  
  public boolean a(double paramDouble)
  {
    boolean bool = w.e;
    if (!bool) {
      if (this.a.b < this.b.b)
      {
        if ((bool) || (paramDouble > this.a.b + e)) {
          if (bool) {}
        }
        return paramDouble < this.b.b - e;
      }
    }
    if ((bool) || (paramDouble > this.b.b + e)) {
      if (bool) {}
    }
    return paramDouble < this.a.b - e;
  }
  
  public boolean b(double paramDouble)
  {
    boolean bool = w.e;
    if (!bool) {
      if (this.a.a < this.b.a)
      {
        if ((bool) || (paramDouble > this.a.a + e)) {
          if (bool) {}
        }
        return paramDouble < this.b.a - e;
      }
    }
    if ((bool) || (paramDouble > this.b.a + e)) {
      if (bool) {}
    }
    return paramDouble < this.a.a - e;
  }
  
  public double f()
  {
    return this.d;
  }
  
  public double g()
  {
    return this.c;
  }
  
  public double h()
  {
    return i().d();
  }
  
  public t a()
  {
    boolean bool = w.e;
    if (!bool) {}
    double d1 = this.a.a < this.b.a ? this.a.a : this.b.a;
    if (!bool) {}
    double d2 = this.a.a > this.b.a ? this.a.a : this.b.a;
    if (!bool) {}
    double d3 = this.a.b < this.b.b ? this.a.b : this.b.b;
    if (!bool) {}
    double d4 = this.a.b > this.b.b ? this.a.b : this.b.b;
    return new t(d1, d3, d2 - d1, d4 - d3);
  }
  
  public boolean a(t paramt)
  {
    return a(paramt, this.a.a, this.a.b, this.b.a, this.b.b);
  }
  
  public boolean a(w paramw)
  {
    t localt = new t(paramw.a - e, paramw.b - e, 2.0D * e, 2.0D * e);
    return a(localt, this.a.a, this.a.b, this.b.a, this.b.b);
  }
  
  public boolean b(w paramw)
  {
    t localt = new t(paramw.a - 0.01D, paramw.b - 0.01D, 0.02D, 0.02D);
    return a(localt, this.a.a, this.a.b, this.b.a, this.b.b);
  }
  
  public static final boolean a(t paramt, w paramw1, w paramw2)
  {
    return a(paramt, paramw1.a, paramw1.b, paramw2.a, paramw2.b);
  }
  
  public static final boolean a(t paramt, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool2 = w.e;
    boolean bool1 = w.d;
    double d1 = paramt.d();
    double d2 = paramt.e();
    double d3 = d1 + paramt.b();
    double d4 = d2 + paramt.c();
    int k = a(d1, d2, d3, d4, paramDouble1, paramDouble2);
    if (!bool2) {
      if (k == 0) {
        return true;
      }
    }
    int m = a(d1, d2, d3, d4, paramDouble3, paramDouble4);
    if (!bool2) {
      if (m == 0) {
        return true;
      }
    }
    if (k != 0)
    {
      if (bool1) {
        break label240;
      }
      if ((k & m) != 0) {
        return false;
      }
    }
    label231:
    while (bool2)
    {
      double d5;
      if ((k & 0x3) != 0)
      {
        d5 = d1;
        if (!bool2)
        {
          if ((k & 0x2) != 0) {
            d5 = d3;
          }
          paramDouble2 += (d5 - paramDouble1) * (paramDouble4 - paramDouble2) / (paramDouble3 - paramDouble1);
          paramDouble1 = d5;
        }
        if (bool2) {
          break label231;
        }
        if (!bool1) {}
      }
      else
      {
        d5 = d2;
        if (!bool2)
        {
          if ((k & 0x8) != 0) {
            d5 = d4;
          }
          paramDouble1 += (d5 - paramDouble2) * (paramDouble3 - paramDouble1) / (paramDouble4 - paramDouble2);
        }
        paramDouble2 = d5;
      }
      k = a(d1, d2, d3, d4, paramDouble1, paramDouble2);
      if (!bool1) {
        break;
      }
    }
    label240:
    return true;
  }
  
  private static byte a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
  {
    boolean bool2 = w.e;
    boolean bool1 = w.d;
    byte b1 = 0;
    if (!bool2) {
      if (paramDouble5 < paramDouble1)
      {
        b1 = 1;
        if (bool2) {
          break label58;
        }
        if (!bool1) {
          break label54;
        }
      }
    }
    if (!bool2) {
      if (paramDouble5 > paramDouble3) {
        b1 = 2;
      }
    }
    label54:
    label58:
    if (!bool2) {
      if (paramDouble6 < paramDouble2)
      {
        b1 = (byte)(b1 | 0x4);
        if (bool2) {
          break label106;
        }
        if (!bool1) {
          break label104;
        }
      }
    }
    if (!bool2) {
      if (paramDouble6 > paramDouble4) {
        b1 = (byte)(b1 | 0x8);
      }
    }
    label104:
    label106:
    return b1;
  }
  
  public static w a(n paramn1, n paramn2)
  {
    boolean bool = w.e;
    if (!bool)
    {
      if (paramn2.b())
      {
        n localn = paramn1;
        paramn1 = paramn2;
        paramn2 = localn;
      }
      if (bool) {}
    }
    else if (paramn1.b())
    {
      if (!bool) {
        if (!paramn2.b(paramn1.d().a)) {
          return null;
        }
      }
      d1 = paramn2.g();
      if (!bool)
      {
        if (!Double.isInfinite(d1)) {
          if (bool) {
            break label91;
          }
        }
      }
      else {
        if (!Double.isNaN(d1)) {
          break label87;
        }
      }
      return null;
      label87:
      label91:
      d2 = paramn2.f();
      if (!bool)
      {
        if (!Double.isInfinite(d2)) {
          if (bool) {
            break label138;
          }
        }
      }
      else {
        if (!Double.isNaN(d2)) {
          break label121;
        }
      }
      return null;
      label121:
      d3 = paramn2.f() + paramn2.g() * paramn1.d().a;
      label138:
      if (!paramn1.a(d3)) {
        return null;
      }
      return new w(paramn1.d().a, d3);
    }
    double d1 = paramn1.g();
    double d2 = paramn2.g();
    if (!bool) {
      if (d1 == d2) {
        return null;
      }
    }
    double d3 = (paramn2.f() - paramn1.f()) / (d1 - d2);
    if ((bool) || ((paramn1.b(d3)) && (paramn2.b(d3)))) {
      return new w(d3, d3 * d1 + paramn1.f());
    }
    return null;
  }
  
  public z i()
  {
    return new z(this.b, this.a);
  }
  
  public c j()
  {
    return new c(this.b, this.a);
  }
  
  public double k()
  {
    return this.b.a - this.a.a;
  }
  
  public double l()
  {
    return this.b.b - this.a.b;
  }
  
  public String toString()
  {
    return "SP: " + this.a.toString() + " TP: " + this.b.toString();
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.d.n
 * JD-Core Version:    0.7.0.1
 */